package com.example.springmvcdemo4.Service;

import com.example.springmvcdemo4.mapper.MessageinfoMapper;
import com.example.springmvcdemo4.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    private MessageinfoMapper mapper;
    public Integer publishMessage(MessageInfo messageInfo) {
        return mapper.insertMessage(messageInfo);
    }

    public List<MessageInfo> getList() {
        return mapper.selectAllList();
    }
}
